#![no_std]
#![no_main]

#[inline]
pub fn enter_syscall(
    arg1: usize,
    arg2: usize,
    arg3: usize,
    arg4: usize,
    arg5: usize,
    arg6: usize,
    idx: usize,
) -> usize {
    let ret: usize;
    unsafe {
        core::arch::asm!(
            "syscall",
            in("rax") idx,
            lateout("rax") ret,
            in("rdi") arg1,
            in("rsi") arg2,
            in("rdx") arg3,
            in("r10") arg4,
            in("r8") arg5,
            in("r9") arg6,
        );
    };
    ret
}

pub mod syscall;

pub mod fs;
pub mod mm;
pub mod proc;
